﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="banner.aspx.cs" Inherits="WebApp.admin.basic.banner" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>系统设置</title>
     <link href="../css/skin.css" rel="stylesheet" type="text/css" />

 <script type="text/javascript" language="javascript">
     var i = 1
     function addFile() {
         if (i < 8) {
             var str = '<BR>&nbsp;&nbsp;&nbsp; 图片链接<input name="text" type="text" style="width: 150px" /> 上传文件<input type="file" name="File" runat="server" style="width: 300px"/>'
             document.getElementById('MyFile').insertAdjacentHTML("beforeEnd", str)

         }
         else {
             alert("您一次最多只能上传8张图片！")
         }
         i++
     } 
   </script> 
</head>
<body>
    <form id="form1" runat="server">
      <div class="maincontent">
 

  <table width="100%" border="0" cellpadding="0" cellspacing="0">
    <!-- 图片列表 -->
    <tr><td><asp:Label ID="lblDescription" runat="server" Text="图片尺寸：780*280"></asp:Label> </td></tr>
    <tr><td>
    菜单：<asp:DropDownList ID="ddlPosition" runat="server"  AutoPostBack="true"
            onselectedindexchanged="ddlPosition_SelectedIndexChanged">
            <asp:ListItem Text="首页默认" Value="首页默认"></asp:ListItem>
             <asp:ListItem Text="首页顶部" Value="首页顶部"></asp:ListItem>
              <asp:ListItem Text="首页商品顶部" Value="首页商品顶部"></asp:ListItem>
               <asp:ListItem Text="首页商品中部" Value="首页商品中部"></asp:ListItem>
                <asp:ListItem Text="首页商品底部" Value="首页商品底部"></asp:ListItem>
            </asp:DropDownList>
    </td></tr>
    <tr>
      <td>
      <asp:DataList ID="DataList2" runat="server" RepeatColumns="2" CellPadding="0" ForeColor="#333333" Width="100%">
       <ItemTemplate>
               <div id="gallery_1" style="float:left; text-align:center; border: 1px solid #DADADA; margin: 4px; padding:2px;">
                <a href="banner.aspx?flashid=<%# DataBinder.Eval(Container.DataItem, "flashid")%>&action=del" onclick="if (confirm('您确实要删除该图片吗?')){}else{return false;}">[-]</a><br />
                <a href="../uploadfile/<%# DataBinder.Eval(Container.DataItem, "flashpic")%>" target="_blank">
                <img src="../uploadfile/<%# DataBinder.Eval(Container.DataItem, "flashpic")%>"  width="400" border="0" />
                </a><br />
                <input value="<%# DataBinder.Eval(Container.DataItem, "flashurl")%>" size="15" name="content_<%# DataBinder.Eval(Container.DataItem, "flashid")%>" id="content_<%# DataBinder.Eval(Container.DataItem, "flashid")%>"/>
              </div>
        </ItemTemplate>
      </asp:DataList>    
              </td>
          </tr>
          <tr><td>&nbsp;</td></tr>
    <!-- 上传图片 -->
    <tr>
      <td align="left"><P id="MyFile">
      <a onclick="addFile()" href="#">[+]</a> 图片链接<input name="text" type="text" style="width: 150px" />
        上传文件<input id="File8" type="file" name="File" runat="server" style="width: 300px"/> </P></td>
    </tr>
    <tr>
      <td height="50" align="center">

          <asp:ImageButton ID="ImageButton1" ImageUrl="../images/buttom-02.gif" runat="server" OnClick="ImageButton1_Click" />
       <a href="javascript:form1.reset();"><img src="../images/button03.gif" border="0" /></a>
        </td>
    </tr>
  </table>


    </div>
    </form>
</body>
</html>
